#include "Point.h"

//c'tor with file
Point::Point( ifstream &in_file, bool binary)
{
	if(binary)
	{
		in_file.read( (char*)&m_x, sizeof(int) );
		in_file.read( (char*)&m_y, sizeof(int) );
	}
	else
		in_file >> m_x >> m_y;
}

void Point::savePoint( ofstream &out_file, bool binary)
{
	if(binary)
	{
		out_file.write( (const char*)&m_x, sizeof(int) );
		out_file.write( (const char*)&m_y, sizeof(int) );
	}
	else //text
		out_file << " " << m_x << " " << m_y << " ";
}